package com.joysuch.wwyt.core.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * 描述：文件分片上传
 *
 * @author zhangcancan
 * @date 2023/3/27 10:08
 **/
@Data
@TableName("wwyt_base_file_chunk_item")
public class FileChunkItem {

    private static final long serialVersionUID = -7060193380856910236L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * WWYT_BASE_ATTACHMENT_REPO表 id
     */
    private Long fileId;

    /**
     * 当前分片，从1开始
     */
    private Integer currentChunk;

    /**
     * 分片大小
     */
    private Long chunkSize;

    /**
     * 总分片
     */
    private Integer totalChunkSize;

    /**
     * 文件md5
     */
    private String fileMd5;

    /**
     * 组织机构代码
     */
    @TableField(value = "ORG_CODE", fill = FieldFill.INSERT_UPDATE)
    private String orgCode;

    /**
     * 租户
     */
    @TableField(value = "TENENT_ID", fill = FieldFill.INSERT_UPDATE)
    private Long tenentId;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY", fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY", fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "UPDATE_TIME",update ="now()", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableLogic
    @TableField(value = "DELETE_FLAG", fill = FieldFill.INSERT)
    private String deleteFlag;

}
